//
//  MessageRemind.h
//  Messenger
//
//  Created by OC on 15/6/9.
//  Copyright (c) 2015年 YN-APP-iOS. All rights reserved.
//

#import <Foundation/Foundation.h>
@class FMDatabase;

@interface MessageRemind : NSObject

//群/讨论组ID
@property (nonatomic, strong) NSString *groupID;

//群讨论组名称
@property (nonatomic, strong) NSString *groupName;

//是否提醒 0 不提醒 1 提醒
@property (nonatomic, assign) NSInteger isRemind;

//创建群/讨论组消息提醒表
+ (BOOL)createInDatabase:(FMDatabase *)db;

//插入消息提醒信息
- (BOOL)insertInDatabase:(FMDatabase *)db;

//更新消息提醒信息
- (BOOL)updateInDatabase:(FMDatabase *)db;

//通过群/讨论组ID删除消息提醒信息
+ (BOOL)deleteWithGroupID:(NSString *)groupID database:(FMDatabase *)db;

//根据是否进行提醒查询群/讨论组
+ (NSArray *)queryGroupRemindWithIsRemind:(NSInteger)isRemind database:(FMDatabase *)db;

//查询所有群/讨论组信息
+ (NSArray *)queryInDatabase:(FMDatabase *)db;

//根据群/讨论组ID查询群/讨论组消息提醒
+ (MessageRemind *)queryGroupRemindWithGroupID:(NSString *)groupID database:(FMDatabase *)db;


//判断群/讨论组消息提醒是否存在
- (BOOL)isMessageRemindExistInDatabase:(FMDatabase *)db;

//根据是否提醒属性查询群信息
+ (NSArray*)queryGroupRemind:(NSInteger)isRemind database:(FMDatabase *)db;

//根据是否提醒属性查询讨论组信息
+ (NSArray*)queryDisGroupRemind:(NSInteger)isRemind database:(FMDatabase *)db;

@end
